/*****************************************************************
 *@Copyright all rights reserved ? 2014 Yuga
 *@author YUga studio
 *Contact: zengkang007@gmail.com
 *****************************************************************/
package com.oplink.webbase.modules.invoicing.entity;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.oplink.webbase.common.persistence.DataEntity;
import com.oplink.webbase.modules.sys.entity.User;
/**
 * 告警Entity
 * @author YUga studio
 * @version 2015-01-12
 */
@Entity
@Table(name = "invoicing_amount_receive")
@DynamicInsert
@DynamicUpdate
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class AmountReceive extends DataEntity {
	
	private static final long serialVersionUID = 1L;
	private User user;
	private int sort; // ����
	private Integer totalAmount; // 总金额
	private Integer saleFormId; // 销售单号
	private Integer goodsId; // 商品编号
	private Integer salesQuantity; // 销售数量
	private Integer costPrice; // 成本单价
	private Integer salePrice; // 销售单价
	private Integer taxes; // 税

    
	  public Integer getTotalAmount() {
        return totalAmount;
      }
      
      public void setTotalAmount(Integer totalAmount) {
        this.totalAmount = totalAmount;
      }
    
	  public Integer getSaleFormId() {
        return saleFormId;
      }
      
      public void setSaleFormId(Integer saleFormId) {
        this.saleFormId = saleFormId;
      }
    
	  public Integer getGoodsId() {
        return goodsId;
      }
      
      public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
      }
    
	  public Integer getSalesQuantity() {
        return salesQuantity;
      }
      
      public void setSalesQuantity(Integer salesQuantity) {
        this.salesQuantity = salesQuantity;
      }
    
	  public Integer getCostPrice() {
        return costPrice;
      }
      
      public void setCostPrice(Integer costPrice) {
        this.costPrice = costPrice;
      }
    
	  public Integer getSalePrice() {
        return salePrice;
      }
      
      public void setSalePrice(Integer salePrice) {
        this.salePrice = salePrice;
      }
    
	  public Integer getTaxes() {
        return taxes;
      }
      
      public void setTaxes(Integer taxes) {
        this.taxes = taxes;
      }
    
    
    // JPA ����USER_ID�еĶ��һ��ϵ����
	@ManyToOne
	@JoinColumn(name = "user_id")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	} 
	
	@Transient
	public int getSort() {
		return sort;
	}

	public void setSort(int sort) {
		this.sort = sort;
	}
}
